package xu.zhi.qing.user.entity;

import java.sql.Timestamp;

public class User {
    // Fields

    private Integer id;
    private String username;
    private String password;
    private String gender;
    private String imgPath;
    private Timestamp createTime;
    private Integer status;

    public static final Integer STATUS_PUBLIC=0;
    public static final Integer STATUS_PRIVATE=1;

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGender() {
        return this.gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getImgPath() {
        return this.imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public Timestamp getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    @Override
    public int hashCode() {
        return id;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj==null) {
            return false;
        }
        if(!(obj instanceof User)){
            return false;
        }
        User user=(User)obj;
        if (user.getId().equals(getId())) {
            return true;
        }else {
            return false;
        }
    }
}
